#Slot IBAA
execute as @e[tag=VoidShop.slot,type=item_display,nbt={item:{components:{"minecraft:custom_data":{VoidShopSlot:{selected:false}}}}}] at @s if function vs:system/game_ctrol/void_shop/is_being_aimed_at/test run function vs:system/game_ctrol/void_shop/slot/selected/toggle
execute as @e[tag=VoidShop.slot,type=item_display,nbt={item:{components:{"minecraft:custom_data":{VoidShopSlot:{selected:true}}}}}] at @s unless function vs:system/game_ctrol/void_shop/is_being_aimed_at/test run function vs:system/game_ctrol/void_shop/slot/selected/toggle

#PageButton IBAA
execute as @e[tag=VoidShop.PageButton,type=item_display,nbt={item:{components:{"minecraft:custom_data":{VoidShopPB:{selected:false}}}}}] at @s if function vs:system/game_ctrol/void_shop/is_being_aimed_at/test run function vs:system/game_ctrol/void_shop/page_button/selected/toggle
execute as @e[tag=VoidShop.PageButton,type=item_display,nbt={item:{components:{"minecraft:custom_data":{VoidShopPB:{selected:true}}}}}] at @s unless function vs:system/game_ctrol/void_shop/is_being_aimed_at/test run function vs:system/game_ctrol/void_shop/page_button/selected/toggle

#Slot BuyItem
execute as @e[tag=VoidShop.slot,type=item_display] at @s if data entity @n[distance=..1,type=interaction,tag=VoidShop.slotInteraction] interaction run function vs:system/game_ctrol/void_shop/trade/buy with entity @s item.components."minecraft:custom_data".VoidShopSlot

#PageButton Click
execute as @e[tag=VoidShop.PageButton,type=item_display,tag=next] at @s if data entity @n[tag=VoidShop.PBInteraction,distance=..1,type=interaction] interaction run function vs:system/game_ctrol/void_shop/page_button/next_click
execute as @e[tag=VoidShop.PageButton,type=item_display,tag=previous] at @s if data entity @n[tag=VoidShop.PBInteraction,distance=..1,type=interaction] interaction run function vs:system/game_ctrol/void_shop/page_button/previous_click

#TradeItem
execute as @e[tag=TradeItem,nbt={Age:20s},type=item] run data modify entity @s Glowing set value true
execute as @e[tag=TradeItem,nbt={Age:800s},type=item] run kill @s